<?php 
namespace app\model;
use think\Model;

class ApiMsg extends Model
{	
    public static function getConfig($model){
        $config = [];
        if (in_array($model, ['ERNIE-4.0'])) {
            $config['api_url'] = 'https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro';
            $config['client_id'] = 'YeyMF21dXex0vmVjUP5Z044G';
            $config['client_secret'] = 'IoFoQbHWLmf0c8t9VGXM9baYqIOqfbD7';
        }elseif(in_array($model, ['qwen-turbo','qwen-plus','qwen-max','qwen-max-0403','qwen-max-0107','qwen-max-1201','qwen-max-longcontext','farui-plus'])){
            $config['api_url'] = 'https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation';
            $config['api_key'] = 'sk-f46ae189037c41358df335d5518385b3';
        }elseif(in_array($model, ['farui'])){
            $config['api_url'] = 'https://tyfarui.biz.aliyun.com/open/legalMind/detailTalkAsyn.json';
            $config['appId'] = '35029ab8';
            $config['appKey'] = '24bdc413c44d7b65';
            $config['appSecret'] = '52eb8a0ff50d93d9';
        }elseif(in_array($model, ['moonshot-v1-8k','moonshot-v1-32k','moonshot-v1-128k'])){
            $config['api_url'] = 'https://api.moonshot.cn/v1/chat/completions';
            $config['key'] = 'sk-zrCchwoW561EpRUyJo3CTd1eFBQtDI3EDaMzS4FI0jtQoHIs';
        }
        return $config;
    }



	
}


 ?>